import request from '@/utils/http'
import { method } from 'lodash'

//表格数据
export function familymanList(data:any) {
    return request({
        method: 'get',
        url: '/biosample/familyman/list',
        params: data
    })
}
// 添加
export function familymanAdd(data:any) {
    return request({
        method: 'post',
        url: '/biosample/familyman/save',
        data
    })
}
// 修改
export function familymanUpdate(data:any) {
    return request({
        method: 'post',
        url: '/biosample/familyman/update',
        data
    })
}
// 修改-数据显示
export function familymanShow(id:number) {
    return request({
        method: 'get',
        url: `/biosample/familyman/info/${id}` ,
    })
}
// 添加成员-打开弹窗-身份信息
export function familymanInfo(id:number) {
    return request({
        method: 'get',
        url: `/biosample/familyman/info/${id}` ,
    })
}
// 身份证
export function familymanCard(card:string) {
    return request({
        method: 'get',
        url: '/biosample/donorsinfo/getByIdCard/' + card ,
    })
}
// 添加成员-确定
export function familymanAddUser(data:any) {
    return request({
        method: 'post',
        url: '/biosample/donorsinfo/save',
        data
    })
}
// 家系成员列表
export function familymanUserList(data:any) {
    return request({
        method: 'get',
        url: '/biosample/donorsinfo/list',
        params: data
    })
}

// 导出
export function familymanExport(key:any) {
    return request({
        method: 'get',
        url: '/biosample/familyman/export-excel-familyman',
        params: { key },
        responseType: "blob"
    })
}